<table>
{% regroup oneclasses by date.month as oneclass_list %}

<ul>
{% for oneclass in oneclass_list %}
    <li>{{ oneclass.grouper }}
        <ul>
            {% for item in oneclass.list %}
            <li>
                <a href="{% url oneclass_detail item.id %}">{{ forloop.counter }}</a>
                {{ item.date }}
                {{ item.start_time|date:"h:m" }} ~{{ item.end_time|date:"h:m" }}
                {{ item.day }}
                {{ item.grade }}
                {{ item.status }}
            </li>
            {% endfor %}
        </ul>
    </li>
{% endfor %}
</ul>

